<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo Yii::app()->name;?> 后台管理</title>
<?php $this->renderPartial('/_include/_header');?>

</head>
<body class="view_index" id="view_index_Article">

<form class="view-index-form mt-10" method="post" action="<?php echo $this->createUrl('SlideOrder');?>" enctype="multipart/form-data">
按降序排列<br>
<table class="view-index-list" border="0" cellspacing="0" cellpadding="0" width="100%">
    <thead>
        <tr>
                        
                        <th align="left" width="40">序号</th>
                        <th align="left" width="40">排序</th>
                        <th align="left">帖子主题</th>

        </tr>
    </thead>
    <tbody>
   <?php  
        
    foreach($rows as $k=>$v){
       
    ?>
    <tr>

        <td><?php echo $v['postid'];?></td> 
        <td><input class="input-text input-listorder" value="<?php echo $v['listorder'];?>" name="listorder[<?php echo $v['postid'];?>]"></td>
        <td><?php echo $v['subject'];?></td>

        <?php
      
    }
?>
    </tr>
      
        
        
        
        </tbody>
    
</table>


<input type="hidden" class="input-text" id="YII_CSRF_TOKEN" name="YII_CSRF_TOKEN" value="<?php echo Yii::app()->request->csrfToken;?>">
</form>

<script>
function order(){
    $('form').submit();
}

$(function(){	

	$('table').addClass('view-index-list');
	
    var api = art.dialog.open.api;
	//alert(api);

    //操作对话框
	
    api.button(
		{
			name: '确定排序',
			callback: function () {
				order();
				return false;
			},
			focus: true
		},
		{
			name: '取消'
		}
		/*, 更多按钮.. */
	)
	// 锁屏
	.lock();
	

});
</script>
<?php $this->renderPartial('/_include/_footer');?></body>
</html>